package com.cdu.ai_intelligent_teaching_and_training_system.mapper;

import com.cdu.ai_intelligent_teaching_and_training_system.entity.AssignmentSubmission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AssignmentSubmissionMapper {
    
    // 插入作业提交
    int insert(AssignmentSubmission submission);
    
    // 根据ID查询作业提交
    AssignmentSubmission selectById(@Param("submissionId") Long submissionId);
    
    // 根据作业ID查询提交
    List<AssignmentSubmission> selectByAssignmentId(@Param("assignmentId") Long assignmentId);
    
    // 根据学生ID查询提交
    List<AssignmentSubmission> selectByStudentId(@Param("studentId") Long studentId);
    
    // 根据作业ID和学生ID查询提交
    AssignmentSubmission selectByAssignmentIdAndStudentId(@Param("assignmentId") Long assignmentId, @Param("studentId") Long studentId);
    
    // 查询所有作业提交
    List<AssignmentSubmission> selectAll();
    
    // 更新作业提交
    int update(AssignmentSubmission submission);
    
    // 删除作业提交
    int deleteById(@Param("submissionId") Long submissionId);
}
